package com.jt.controller;

import com.jt.feign.RemoteProviderSevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/feign/")
public class FeignConsumerController {
    @Autowired
    private RemoteProviderSevice remoteProviderSevice;
    @GetMapping("echo/{msg}")
    public String doRestEcho(@PathVariable String msg)
            throws InterruptedException {
        //Thread.sleep(50000);
        return remoteProviderSevice.echoMsg(msg);
    }
}
